<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>

    <link rel="stylesheet" href="/css/amazeui.cropper.css">
    <link rel="stylesheet" href="/css/custom_up_img.css">


    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/commone.css">
    <link rel="stylesheet" media="screen and (min-width:481px)" href="/css/usercenter.css">
    <link rel="stylesheet" media="screen and (max-width:480px)" href="/css/usercenter(1).css">

    <script src="/js/hm.js"></script>
    <script type="text/javascript">
        var basePath = "/";
    </script>
    <script src="/js/common.js"></script>
    <script src="/js/jquery-3.5.1.min.js"></script>
    <script src="/js/footfixed.js"></script>
    <script src="/js/md5.js" type="text/javascript"></script>
    <script src="http://www.hasbei.com/static/layer/layer.js" type="text/javascript"></script>
    <link rel="stylesheet" href="http://www.hasbei.com/static/layer/theme/default/layer.css?v=3.1.1" id="layuicss-layer">


    <title>个人中心</title>


    <script src="/js/amazeui.min.js"></script>
    <script src="/js/cropper.min.js"></script>
    <script src="/js/custom_up_img.js"></script>
</head>
<body>
<div>
    <!--头部-->
    <div th:replace="common/hasbei_top"></div>
    <div th:replace="common/hasbei_top_user"></div>
    <div class="content-main">
        <div class="main-info">
            <div class="main-user-left">

                <div class="user-left-card info-card">
                    <div class="user-img"><img th:src="${userSolo.imgpath}"></div>
                    <div class="usertop-for-phone">
                        <div class="user-name" th:text="${userSolo.name}">有贝口腔网 王白石</div>
                        <div class="user-style" th:text="${userSolo.introduce}">不要做懒人，给自己一个介绍吧</div>
                    </div>
                </div>
                <div class="user-left-card">
                    <div class="card-flex">
                        <div class="user-inter"><a href="javascript:"><span class="user-inter-num" th:text="${userSolo.quizCount}">0</span><span>提问</span></a></div>
                        <div class="line"></div>
                        <div class="user-inter"><a href="javascript:"><span class="user-inter-num" th:text="${userSolo.answerCount}">308</span><span>回答</span></a></div>
                        <div class="line"></div>
                        <div class="user-inter"><a href="javascript:"><span class="user-inter-num" th:text="${userSolo.articleCount}">0</span><span>文章</span></a></div>
                    </div>
                </div>


            </div>

            <div class="main-user-right">

                <input type="hidden" id="no" th:value="${userSolo.uid}">
                <div class="user-right-top">
                    <ul>
                        <li class="select-active" id="dy"><a href="javascript:;">动态</a></li>
                        <li id="q"><a href="javascript:;">提问&nbsp;<span th:text="${userSolo.quizCount}"></span></a></li>
                        <li id="an"><a href="javascript:;">回答&nbsp;<span th:text="${userSolo.answerCount}"></span></a></li>
                        <li id="art"><a href="javascript:;">文章&nbsp;<span th:text="${userSolo.articleCount}"></span></a></li>
                    </ul>
                </div>

                <div class="user-right-action">
                    <div id="myContent"><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="795" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296739373068455936" target="_blank">人人都可以洗牙吗？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 洗牙并非人人都适合，有以下病症的患者需注意：1.身患牙齿部良性肿瘤的病人，不容易接纳基本洗牙结石，以防止肿瘤扩散。3.身患活跃性心绞痛、大半年内发病过的心梗及其无法合理控制的高血压和慢性心衰等的病人不</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="794" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296739623908806656" target="_blank">牙医诊所美白牙齿可靠吗？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 做牙齿美白需要去正规的诊所或医院，正规诊所具有专业的医生与设备，可以达成较好的牙齿美白效果，因此在正规诊所做牙齿美白是可靠的。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="793" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296739798471544832" target="_blank">拔牙后多久可以喝热水？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 牙齿拔除以后，局部拔牙创口在四天后，填满拔牙创口的血凝块已经基本愈合，表面会形成一层白色的假膜，保护创面，是可以适当喝一些温开水，不会引起出血的。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="792" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296739836849426432" target="_blank">试管婴儿降调期间能补牙么？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 最好是不要补牙的，等过一段时间稳定后补牙。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="791" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296739999437426688" target="_blank">牙齿矫正时能去当兵吗？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 牙齿矫正的时候一般是通过不了体检的，最好还是矫正以后再去体检。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="790" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008211296740074830041088" target="_blank">牙周炎会自己流血吗，不碰它流血的那种？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 牙周炎会引起牙龈部位血管扩张充血，并且有可能出现破损部位的自发性出血，所以牙周炎是有可能自己出血的。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">1天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="783" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008201296374509145821184" target="_blank">洗牙对牙齿有伤害吗？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] “洗牙”是用机械或物理方法除掉牙面的细菌、牙石、色素等牙垢。到正规的口腔医院或口腔科去洗牙，不会对牙齿有什么损害，反而对坚固牙齿和口腔保健大有好处。</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">2天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="782" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008201296374557959131136" target="_blank">轻度四环素牙好想知道什么办法最好？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>1收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 四环素牙是换牙期服用四环素药物引起的。轻中度是可以通过药物美白牙齿，重度的话只有考虑做烤瓷牙恢复牙齿的颜色。药物美白，有两种(1)冷光美白，是把药物涂抹在牙齿表面上，之后用机器照在上面，使药物吸收到牙</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">2天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="781" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008201296374725714513920" target="_blank">补牙前封药后是不是会一直痛的？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>1回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 不是的，如果是杀神经的药物的话，在封药的过程中，有的人会觉得有疼痛！可以吃点止疼痛片！</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div><div class="action-item">

                        <div class="action-item-top">
                            <div class="item-span">



                                <span class="status-word">回答了问题</span>



                                <span class="time">2天前</span>
                            </div>
                            <span class="delete" onclick="delDy(this)" id="780" style="display:none">x</span>
                        </div>
                        <div class="action-item-title">



                            <a href="/qa/detail/202008201296375241215447040" target="_blank">龅牙然后导致嘴巴前凸，怎么办呀，带牙套还是拔掉，要多少钱啊？</a>


                        </div>



                        <div class="ansower-collect">
                            <span>2回答</span>
                            <span class="dotted"></span>
                            <span>0收藏</span>
                        </div>



                        <!-- 头像 <div class="action-img-name">
                        <a href=""><img src="images/User.png" alt="有贝口腔网"><span>十高手手</span></a>
                        </div> -->
                        <div class="ansower-content">
                            <a target="_blank">[回答内容] 一般讲的龅牙，临床上叫做尖牙。位于两侧的口角部位。对口角有支撑的作用。所以不应该拔掉。龅牙可以通过牙齿的正畸治疗得到改善。正畸治疗一般需要两年左右的时间，费用大约在1万到5万元左右。治疗期间每个月需要</a>
                        </div>

                        <div class="ansower-share-setting">
                            <div class="ansower-share">


                                <!-- 回答 -->

                                <a href="javascript:;" target="_self"><span>0点赞</span></a>
                                <a href="javascript:;" target="_self"><span>0评论</span></a>


                                <!-- <div style="margin-top: -2px;">
                                    <a href=""><img src="images/icon_Share.png" alt="有贝口腔网"><span>分享</span></a>
                                </div> -->

                            </div>
                        </div>


                    </div></div>
                    <div class="more-content">
                        <div class="load-more" style="display: none;">
                            <img src="/static/images/load-more.gif">
                            <span>加载中</span>
                        </div>
                        <div class="load-more-two load-more-fade" style="" onclick="moreList()">点击加载更多</div>
                        <div class="no-data" style="display:none">┭┮﹏┭┮,没有数据啦</div>
                    </div>
                </div>

            </div>
        </div>
    </div>


</div>

<script>
    function editQaReply(obj){
        console.log(obj)
        $("#form-title").val(obj.qtitle);
        $('#form-title').attr('readonly','readonly');

        if(obj.aaContent){
            $("#textlength").text(obj.aaContent.length);
            editor.txt.html(obj.aaContent);
        }else{
            $("#textlength").text(obj.answerComment.length);
            editor.txt.html(obj.answerComment);
        }



        layer.open({
            title: "修改回答"
            , content: $('#mytext')
            , type: 1
            , area: ["auto", "auto"]
            , anim: 5
            , btn: ['yes', 'no']
            ,yes: function(index, layero){

                var content=editor.txt.text();
                var answer_id=obj.answerId;
                var aaid=obj.aidNo;

                if(content.length<=10){
                    layer.msg("回答内容不能低于10");
                    return false;
                }
                var data={};
                data['answer_id']=answer_id;
                data['aaid']=aaid;
                data['qid']=obj.qid;
                data['answer_comment']=content;
                $.ajax({
                    type: "PUT",
                    url: basePath + "answers/update",
                    data: data,
                    success: function (data) {
                        console.log(data)
                        if(data.code=='200'){
                            layer.msg("修改成功")
                            setTimeout(function(){
                                layer.closeAll(); //疯狂模式，关闭所有层
                            },1500)
                            $("#myContent").html('');
                            qaReplyList();
                        }
                    }
                });




            }
            ,btn2: function(index, layero){

            }
        });
    }
    function editArt(obj,type){
        console.log(obj)
        $("#textlength").text(obj.acontent.length)
        $("#form-title").val(obj.atitle);
        $("#form-title").removeAttr('readonly')
        editor.txt.html(obj.acontent);

        layer.open({
            title: "修改文章"
            , content: $('#mytext')
            , type: 1
            , area: ["auto", "auto"]
            , anim: 5
            , btn: ['yes', 'no']
            ,yes: function(index, layero){
                var data={};
                data['a_content']=editor.txt.text();
                data['a_title']= $("#form-title").val();
                data['uid']=obj.uid;
                data['aid']=obj.aid;
                data['type']=type;

                $.ajax({
                    type: "PUT",
                    url: basePath + "consult/update",
                    data: data,
                    success: function (data) {
                        console.log(data)
                        if(data=='ok'){
                            layer.msg("修改成功，待审核")
                            setTimeout(function(){
                                layer.closeAll(); //疯狂模式，关闭所有层
                            },1500)
                            $("#myContent").html('');
                            articleList();
                        }else{

                        }
                    }
                });

            }
            ,btn2: function(index, layero){

            }
        });
    }

    function delQa(obj) {
        var data={};
        data['qid']=obj;
        $.ajax({
            type: "POST",
            url: basePath + "qa/del",
            data: data,
            success: function (data) {
                console.log(data);
                layer.msg("删除成功！")
                $("#item"+obj).remove();
            }
        });
    }//删除提问未审核
    function delQaReply(obj,type) {

        var data={};
        if(type=='no'){
            data['aaid']=obj;
        }else{
            data['answer_id']=obj;
        }


        console.log(data)
        $.ajax({
            type: "POST",
            url: basePath + "answers/delete",
            data: data,
            success: function (data) {
                console.log(data)
                if(type=='no'){
                    $("#itemno"+obj).remove();
                }else{
                    $("#itemyes"+obj).remove();
                }

            }
        });
    }//删除回答
    function delCollect(cid) {

        var data={};
        data['cid']=cid;

        $.ajax({
            type: "POST",
            url: basePath + "sc/del",
            data: data,
            success: function (data) {
                if(data.code=='200'){
                    $('#item'+cid).remove();
                    var sum=$("#myUserSc").text();

                    $('#myUserSc').text( parseInt(sum)-1)
                    layer.msg("取消收藏成功")
                }else{
                    layer.msg("取消收藏异常，请稍后重试")
                }

            }
        });
    }//删除收藏
    function delArt(aid,type) {

        var data={};
        data['aid']=aid;
        data['type']=type;
        $.ajax({
            type: "POST",
            url: basePath + "consult/del",
            data: data,
            success: function (data) {
                if(data=='ss'){
                    $("#item"+aid).remove();
                    layer.msg('删除成功！')
                }

            }
        });
    }//删除文章
    function delDy(did) {
        var data={};
        data['did']=did;
        $.ajax({
            type: "POST",
            url: basePath + "user/delDy",
            data: data,
            success: function (data) {
                console.log(data)
                if(data.code=='200'){
                    $("#item"+did).remove();
                    layer.msg('删除成功！')
                }else{
                    layer.msg('删除失败！请稍后重试')
                }



            }
        });
    }
</script>
<script>

    var current=1;
    var tabId="";
    var no="";//用户编号
    //动态数据
    function dyList(){
        $(".load-more").show();
        $(".load-more-two").hide();
        $.post(basePath+"user/index?startIndex="+current+"&uid="+no,function(data){
            $(".load-more").hide();
            //如果没有数据了就隐藏
            if(data.length==0){
                $(".load-more-two").hide();
                if(current==1){
                    $(".no-data").show();
                }
            }else{
                $(".load-more-two").show();
                $("#myContent").append(data);
            }
        });
    }
    //提问数据
    function qaList(){
        $(".load-more").show();
        $(".load-more-two").hide();
        $.post(basePath+"user/qalist?startIndex="+current+"&uid="+no,function(data){
            $(".load-more").hide();
            //如果没有数据了就隐藏
            if(data.length==0){
                $(".load-more-two").hide();
                if(current==1){
                    $(".no-data").show();
                }
            }else{
                $(".load-more-two").show();
                $("#myContent").append(data);
            }
        });
    }
    //回答数据列表
    function qaReplyList(){
        $(".load-more").show();
        $(".load-more-two").hide();
        $.post(basePath+"user/qaReplylist?startIndex="+current+"&uid="+no,function(data){
            $(".load-more").hide();
            //如果没有数据了就隐藏
            if(data.length==0){
                $(".load-more-two").hide();
                if(current==1){
                    $(".no-data").show();
                }
            }else{
                $(".load-more-two").show();
                $("#myContent").append(data);
            }
        });
    }
    //文章数据列表
    function articleList(){
        $(".load-more").show();
        $(".load-more-two").hide();
        $.post(basePath+"user/articlelist?startIndex="+current+"&uid="+no,function(data){
            $(".load-more").hide();
            //如果没有数据了就隐藏
            if(data.length==0){
                $(".load-more-two").hide();
                if(current==1){
                    $(".no-data").show();
                }
            }else{
                $(".load-more-two").show();
                $("#myContent").append(data);
            }
        });
    }
    function collectList(){//收藏
        $(".load-more").show();
        $(".load-more-two").hide();
        $.post(basePath+"user/collectList?startIndex="+current+"&uid="+no,function(data){
            $(".load-more").hide();
            //如果没有数据了就隐藏
            if(data.length==0){
                $(".load-more-two").hide();
                if(current==1){
                    $(".no-data").show();
                }
            }else{
                $(".load-more-two").show();
                $("#myContent").append(data);
            }
        });
    }
    function loadTabList(){
        if(tabId=='dy'){//动态
            dyList();
        }else if(tabId=='an'){// 回答
            qaReplyList();
        }else if(tabId=='q'){// 提问
            qaList();
        }else if(tabId=='art'){// 文章
            articleList();
        }else if(tabId=="col"){//收藏
            collectList();
        }
    }





    //加载更多
    function moreList(){
        current++;
        loadTabList();
    }
    function initList(){
        no=$("#no").val();
        tabId='dy';//动态
        dyList();
    }
    initList();//初始化
    // 点击tab标签
    $(".user-right-top li").click(function(){
        var id=$(this).attr("id");
        if(id==tabId){
            return ;
        }
        tabId=id;
        current=1;
        $("#myContent").html("");
        $(".load-more-two").hide();
        $(".no-data").hide();
        loadTabList();
        $("li").removeClass("select-active");
        $(this).addClass("select-active");
    })



    $(".change-info-show").hide();
    $(".change-info-btn").click(function(){
        $(".change-info-top").hide();
        $(".change-info-show").show();
    })
    $(".write-box-input").change(function(){
        var inputle = $(this).val().length;
        $(".write-box-span i").text(inputle);
    })
    $(".write-box-textarea").change(function(){
        var textareale = $(this).val().length;
        $(".write-box-right i").text(textareale);
    })
    $(".write-box-input").focus(function(){
        $(this).parent().css("border-color","rgba(41,167,230,1)");
    })
    $(".write-box-input").blur(function(){
        $(this).parent().css("border-color","#ddd");
    })
    $(".write-box-textarea").focus(function(){
        $(this).parent().css("border-color","rgba(41,167,230,1)");
    })
    $(".write-box-textarea").blur(function(){
        $(this).parent().css("border-color","#ddd");
    })
    $(".sure-btn").click(function(){
        var inputval = $(".write-box-input").val();
        var textareaval =$(".write-box-textarea").val();
        if(inputval == "" || textareaval == ""){
            alert("请输入信息");
            return false;
        }
        $(".h3-name").text(inputval);
        $(".p-style").text(textareaval);

        $(".change-info-show").hide();
        $(".change-info-top").show();
    })
    $(".close-btn").click(function(){
        $(".change-info-show").hide();
        $(".change-info-top").show();
    })




</script>





</body>
</html>